<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-cn" xml:lang="zh-cn">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="DC.Type" content="topic">
  <meta name="DC.Title" content="恢复时报错：new_collation_enabled不匹配">
  <meta name="product" content="">
  <meta name="DC.Relation" scheme="URI" content="TiDB_00062.html">
  <meta name="prodname" content="">
  <meta name="version" content="">
  <meta name="brand" content="">
  <meta name="DC.Publisher" content="20250306">
  <meta name="prodname" content="csbs">
  <meta name="documenttype" content="usermanual">
  <meta name="DC.Format" content="XHTML">
  <meta name="DC.Identifier" content="ZH-CN_TOPIC_0000002200065113">
  <meta name="DC.Language" content="zh-cn">
  <link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
  <title>恢复时报错：new_collation_enabled不匹配</title>
 </head>
 <body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px">
  <a name="ZH-CN_TOPIC_0000002200065113"></a><a name="ZH-CN_TOPIC_0000002200065113"></a>
  <h1 class="topictitle1">恢复时报错：new_collation_enabled不匹配</h1>
  <div>
   <div class="section">
    <h4 class="sectiontitle">注意事项</h4>
    <ul>
     <li>new_collation_enabled配置项只有在初始化集群时才生效，初始化集群后，无法通过更改配置项打开或者关闭新的collation框架。</li>
     <li>若上下游集群的new_collation_enabled配置项不相同，且进行强行恢复，BR会报数据校验错误。</li>
    </ul>
   </div>
   <div class="section">
    <h4 class="sectiontitle">故障现象</h4>
    <p>恢复时报错：new_collation_enabled不匹配。</p>
   </div>
   <div class="section">
    <h4 class="sectiontitle">可能原因</h4>
    <p>从TiDB v6.0.0版本开始，new_collations_enabled_on_first_bootstrap配置项的默认值由false改为true。BR会备份上游集群的mysql.tidb表中的new_collation_enabled配置项。当上下游集群的此项配置相同时，BR才会将上游集群的备份数据安全地恢复到下游集群中。若上下游的该配置不相同，BR会拒绝恢复，并报此配置项不匹配的错误。</p>
   </div>
   <div class="section">
    <h4 class="sectiontitle">处理步骤</h4>
    <ol>
     <li><span>使用TiDB客户端工具连接到上游TiDB数据库实例。</span></li>
     <li><span>执行以下命令检查上游集群的new_collation_enabled配置项。</span><p></p><pre class="screen">SELECT * FROM mysql.tidb WHERE VARIABLE_NAME = 'new_collation_enabled':</pre> <p>回显示例如下：</p> <p><span><img src="zh-cn_image_0000002164664442.png"></span></p> <p></p></li>
     <li><span>使用TiDB客户端工具连接到下游TiDB数据库实例。</span></li>
     <li><span>执行以下命令检查下游集群的new_collation_enabled配置项。</span><p></p><pre class="screen">SELECT * FROM mysql.tidb WHERE VARIABLE_NAME = 'new_collation_enabled':</pre> <p></p></li>
    </ol>
   </div>
   <p></p>
  </div>
  <div>
   <div class="familylinks">
    <div class="parentlink">
     <strong>父主题：</strong> <a href="TiDB_00062.html">常见问题</a>
    </div>
   </div>
  </div>
 </body>
</html>